package com.flainsky.nirvanaplayer.globe;

import com.flainsky.nirvanaplayer.cache.ImageCache;

import android.content.Context;

public class GlobeCache {
	public final static int MULTIPLE_OF_SMALL = -1;
	private final static int NUM_CACHE = 40;
	private static Context mContext;
	private static GlobeCache instance;
	private ImageCache imageCache;
	
	public static GlobeCache getInstance() {
		if(instance!=null){
			return instance;
		}
		else{
			makeInstance(mContext);
			return instance;
		}
	}
	
	public static synchronized void makeInstance(Context context){
		mContext = context;
		if(instance==null){
			instance=new GlobeCache();
		}
	}
	private GlobeCache()
	{
		imageCache = new ImageCache(NUM_CACHE);
	}
	
	public ImageCache getCache()
	{
		return imageCache;
	}
}
